from math import factorial


def Fact(num):
    sum=0
    for i in range(1,num+1):
        # print(i)
        sum=sum+(factorial(i)*(-1)**(i-1))
    print(sum)

Fact(10)